<template>
  <div id="app">
    直接使用：{{$store.state.count}}<br />
    使用mapState：{{count}}<hr />
    <A />
    <B />
  </div>
</template>

<script>
import  { mapState } from 'vuex'
import A from './components/a'
import B from './components/b'
export default {
  name: 'App',
  components: {
    A,
    B
  },
  computed: {
    ...mapState(['count'])
  }
}
</script>

<style>
*{
  text-align: center;
}
</style>
